package com.sikaryofficial.workbench.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 商品描述类型
 */
@Getter
@AllArgsConstructor
public enum GoodsStyleEnum {

    // 款式: style:disposable 一次性,cartridge 弹药筒,other 其他
    DISPOSABLE("disposable","Disposable"),
    CARTRIDGE("cartridge","Pod System"),
    OTHER("other","Others");

    private final String name;
    private final String desc;

    public static GoodsStyleEnum getByCode(String name) {
        for (GoodsStyleEnum goodsDescTypeEnum : GoodsStyleEnum.values()) {
            if (goodsDescTypeEnum.getName().equals(name)) {
                return goodsDescTypeEnum;
            }
        }
        return null;
    }
}
